home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
f
/
fieldsofbattlereg1.dms
/
fieldsofbattlereg1.adf
/
Install
< prev
next >
Wrap
Text File
|
1995-09-13
|
15KB
|
523 lines
;---------------------------------------------------------------------------
; Script to Install Fields of Battle
; Registered Version 1.2
; Copyright ©1995 Bevelstone Production I/S
; All rights reserved.
;---------------------------------------------------------------------------
;--------Check OS version---------------------------------------------------
(set osversion (/ (getversion) 65536))
(if (< osversion 36)
(abort "\n\nYou must have Kickstart 2.0 and\n\nWorkbench 2.0 or newer\n\n"
"to run Fields of Battle.")
)
;--------Welcome------------------------------------------------------------
(message
"\n\nFields of Battle\nVersion 1.2\n\n"
"Please read the file \"license.txt\"\n\n"
"Proceeding now indicates your acceptance of these terms and conditions."
)
;--------Where to place fob-------------------------------------------------
(set fobdir
(askdir
(prompt "Where to place the Fields of Battle directory ?")
(help @askdir-help)
(default @default-dest)
)
)
(set @default-dest fobdir)
(set fobdir (tackon fobdir "Fields of Battle"))
;--------Check for disk space-----------------------------------------------
(set disk_space (getdiskspace @default-dest))
(if (> disk_space 0)
(if (< disk_space 9000000)
(abort "Not enough free disk space, need 9 MB")
)
)
;--------Detect CPU---------------------------------------------------------
(set install_opts -1)
(set cpu_str (database "cpu"))
(set fpu_str "")
(if (exists "c:cpu")
(
(if (not (run "cpu check 68881")) (set fpu_str "68881"))
(if (not (run "cpu check 68882")) (set fpu_str "68882"))
)
)
(if (= cpu_str "68000")
(set install_opts %0001)
)
(if (= cpu_str "68010")
(set install_opts %0001)
)
(if (= cpu_str "68020")
(set install_opts %0010)
)
(if (= cpu_str "68030")
(
(set install_opts %0100)
(if (= fpu_str "")
(set install_opts %0010)
)
)
)
(if (= cpu_str "68040")
(set install_opts %1000)
)
(if (= cpu_str "68060")
(set install_opts %1000)
)
;--------Select executeble files--------------------------------------------
(set install_opts
(askoptions
(prompt
"Please select which versions to install ?\n\n"
("Detected CPU: %s, FPU: %s\n" cpu_str fpu_str)
)
(choices "68000 (any amiga)" "68020" "68030 FPU" "68040 FPU")
(default install_opts)
(help
"To make Fields of Battle run optimal on of your computer we have "
"included 4 different version of the Fields of Battle program file. "
"Using these options you can select which version to install on your "
"harddisk.\nNormaly you will just use the version suggested by this "
"install program.\n\nFacts:\n\n"
" 68000* - Any M680x0 CPU\n"
" commodore ieee math library.\n"
" 68020 - min. M68020 CPU\n"
" commodore ieee math library.\n"
" 68030 FPU - min. M68030 CPU\n"
" inlined M68881/M68882 math.\n"
" 68040 FPU - min. M68040 CPU\n"
" inlined M68881/M68882 math.\n\n"
" *This version is not compiled with optimizing, because of a bug in"
" the SAS/C 6.55 compiler."
)
)
)
(if (= install_opts 0)
(message "\nNo executable file selected.\nYou won't be able to run\nFields of Battle\nif you continue.")
)
;--------Check for fonts----------------------------------------------------
(set font_name "")
(if (not (exists "FONTS:CGTimes.font"))
(
(set result
(askchoice
(prompt "\nYou don't have the font \"CGTimes.font\".\n")
(choices "Find alternate font." "Ignore.")
(help
"Fields of Battle is normally using the vector font "
"\"CGTimes.font\", but you don't have this font installed.\n"
"The \"CGTimes.font\" font should be on your Workbench disks. We "
"recommand that you abort the this installation and install the "
"font from the Workbench disks (See Amiga manuals for details.).\n"
"If you select \"Find alternate font\" you will get a list of "
"available font form which you must select one. (Fields of Battle"
" open this font in 4 sizes 12, 16, 24 and 32 so a bitmap font"
" might get ugly when scaled.)\n"
"Selecting \"Ignore\" you can continue this installation and then "
"install the font afterwards.\n"
"Note: Fields of Battle get the font name from the program icon's "
"tooltypes, so you can always change font bye changing tooltypes. "
"By using the tooltypes it is also possible to use different font "
"in Fields of Battle."
)
)
)
(if (= result 0)
(
(set result (run "list >t:installer-font.lst fonts:#?.font lformat \"%n\" "))
(if (not (= result 0))
(message "Can't build font list\nPlease set tooltypes after install.")
)
(if (= result 0)
(
(run "fob_disk_1:listpick \"Fields of Battle - Install\" \"Select alternate font\" \"t:installer-font.lst\" \"installer-result\" ")
(set new_font (getenv "installer-result"))
)
)
(set font_name new_font)
)
)
)
)
;--------Install starts here------------------------------------------------
(makedir fobdir (infos))
(makedir (tackon fobdir "games"))
(makeassign "fob_dest" fobdir)
;--------Disk 1-------------------------------------------------------------
(copyfiles (source "unzip") (dest "T:"))
(copyfiles (source "read.me") (dest "fob_dest:") (infos))
(copyfiles (source "license.txt") (dest "fob_dest:") (infos))
(complete 0)
(if (bitand install_opts %0001)
(
(working "Unpacking files from disk 1.\n\nExecutable file for 68000")
(set result (run "t:unzip -o -qq FOB_DISK_1:fobexe0.zip -d fob_dest:"))
(if (not (= result 0))
(
(set errtxt ("\nCan't UnZip file: \"fobexe0.zip\"\n\nUnZip return code: %ld " result))
(abort errtxt)
)
)
(if (not (= font_name ""))
(
(tooltype
(dest "fob_dest:Fields of Battle")
(settooltype "TYPEFACE12" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle")
(settooltype "TYPEFACE16" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle")
(settooltype "TYPEFACE24" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle")
(settooltype "TYPEFACE32" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle")
(settooltype "(TYPEFACE12")
)
(tooltype
(dest "fob_dest:Fields of Battle")
(settooltype "(TYPEFACE16")
)
(tooltype
(dest "fob_dest:Fields of Battle")
(settooltype "(TYPEFACE24")
)
(tooltype
(dest "fob_dest:Fields of Battle")
(settooltype "(TYPEFACE32")
)
)
)
)
)
(complete 6)
(if (bitand install_opts %0010)
(
(working "Unpacking files from disk 1.\n\nExecutable file for 68020")
(set result (run "t:unzip -o -qq FOB_DISK_1:fobexe2.zip -d fob_dest:"))
(if (not (= result 0))
(
(set errtxt ("\nCan't UnZip file: \"fobexe2.zip\"\n\nUnZip return code: %ld " result))
(abort errtxt)
)
)
(if (not (= font_name ""))
(
(tooltype
(dest "fob_dest:Fields of Battle (020)")
(settooltype "TYPEFACE12" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (020)")
(settooltype "TYPEFACE16" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (020)")
(settooltype "TYPEFACE24" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (020)")
(settooltype "TYPEFACE32" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (020)")
(settooltype "(TYPEFACE12")
)
(tooltype
(dest "fob_dest:Fields of Battle (020)")
(settooltype "(TYPEFACE16")
)
(tooltype
(dest "fob_dest:Fields of Battle (020)")
(settooltype "(TYPEFACE24")
)
(tooltype
(dest "fob_dest:Fields of Battle (020)")
(settooltype "(TYPEFACE32")
)
)
)
)
)
(complete 12)
;--------Disk 2-------------------------------------------------------------
(askdisk
(prompt "\n\n\nPlease insert the disk labeled \"Disk 2\".")
(help @askdisk-help);
(dest "FOB_DISK_2")
(assigns)
)
(working "Unpacking files from disk 2.\n\nScreenMd tool, options.")
(set result (run "t:unzip -o -qq FOB_DISK_2:fobroot.zip -d fob_dest:"))
(if (not (= result 0))
(
(set errtxt ("\nCan't UnZip file: \"fobroot.zip\"\n\nUnZip return code: %ld " result))
(abort errtxt)
)
)
(complete 14)
(if (bitand install_opts %0100)
(
(working "Unpacking files from disk 2.\n\nExecutable file for 68030 FPU")
(set result (run "t:unzip -o -qq FOB_DISK_2:fobexe3.zip -d fob_dest:"))
(if (not (= result 0))
(
(set errtxt ("\nCan't UnZip file: \"fobexe3.zip\"\n\nUnZip return code: %ld " result))
(abort errtxt)
)
)
(if (not (= font_name ""))
(
(tooltype
(dest "fob_dest:Fields of Battle (030fp)")
(settooltype "TYPEFACE12" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (030fp)")
(settooltype "TYPEFACE16" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (030fp)")
(settooltype "TYPEFACE24" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (030fp)")
(settooltype "TYPEFACE32" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (030fp)")
(settooltype "(TYPEFACE12")
)
(tooltype
(dest "fob_dest:Fields of Battle (030fp)")
(settooltype "(TYPEFACE16")
)
(tooltype
(dest "fob_dest:Fields of Battle (030fp)")
(settooltype "(TYPEFACE24")
)
(tooltype
(dest "fob_dest:Fields of Battle (030fp)")
(settooltype "(TYPEFACE32")
)
)
)
)
)
(complete 19)
(if (bitand install_opts %1000)
(
(working "Unpacking files from disk 2.\n\nExecutable file for 68040 FPU")
(set result (run "t:unzip -o -qq FOB_DISK_2:fobexe4.zip -d fob_dest:"))
(if (not (= result 0))
(
(set errtxt ("\nCan't UnZip file: \"fobexe4.zip\"\n\nUnZip return code: %ld " result))
(abort errtxt)
)
)
(if (not (= font_name ""))
(
(tooltype
(dest "fob_dest:Fields of Battle (040fp)")
(settooltype "TYPEFACE12" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (040fp)")
(settooltype "TYPEFACE16" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (040fp)")
(settooltype "TYPEFACE24" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (040fp)")
(settooltype "TYPEFACE32" font_name)
)
(tooltype
(dest "fob_dest:Fields of Battle (040fp)")
(settooltype "(TYPEFACE12")
)
(tooltype
(dest "fob_dest:Fields of Battle (040fp)")
(settooltype "(TYPEFACE16")
)
(tooltype
(dest "fob_dest:Fields of Battle (040fp)")
(settooltype "(TYPEFACE24")
)
(tooltype
(dest "fob_dest:Fields of Battle (040fp)")
(settooltype "(TYPEFACE32")
)
)
)
)
)
(complete 25)
;--------Disk 3-------------------------------------------------------------
(askdisk
(prompt "\n\n\nPlease insert the disk labeled \"Disk 3\".")
(help @askdisk-help);
(dest "FOB_DISK_3")
(assigns)
)
(working "Unpacking files from disk 3.\n\nData files..")
(set result (run "t:unzip -o -qq FOB_DISK_3:fobdir1.zip -d fob_dest:"))
(if (not (= result 0))
(
(set errtxt ("\nCan't UnZip file: \"fobdir1.zip\"\n\nUnZip return code: %ld " result))
(abort errtxt)
)
)
(complete 37)
;--------Disk 4-------------------------------------------------------------
(askdisk
(prompt "\n\n\nPlease insert the disk labeled \"Disk 4\".")
(help @askdisk-help);
(dest "FOB_DISK_4")
(assigns)
)
(working "Unpacking files from disk 4.\n\nData files..")
(set result (run "t:unzip -o -qq FOB_DISK_4:fobdir2.zip -d fob_dest:"))
(if (not (= result 0))
(
(set errtxt ("\nCan't UnZip file: \"fobdir2.zip\"\n\nUnZip return code: %ld " result))
(abort errtxt)
)
)
(complete 50)
;--------Disk 5-------------------------------------------------------------
(askdisk
(prompt "\n\n\nPlease insert the disk labeled \"Disk 5\".")
(help @askdisk-help);
(dest "FOB_DISK_5")
(assigns)
)
(working "Unpacking files from disk 5.\n\nData files..")
(set result (run "t:unzip -o -qq FOB_DISK_5:fobdir3.zip -d fob_dest:"))
(if (not (= result 0))
(
(set errtxt ("\nCan't UnZip file: \"fobdir3.zip\"\n\nUnZip return code: %ld " result))
(abort errtxt)
)
)
(complete 62)
;--------Disk 6-------------------------------------------------------------
(askdisk
(prompt "\n\n\nPlease insert the disk labeled \"Disk 6\".")
(help @askdisk-help);
(dest "FOB_DISK_6")
(assigns)
)
(working "Unpacking files from disk 6.\n\nData files..")
(set result (run "t:unzip -o -qq FOB_DISK_6:fobdir4.zip -d fob_dest:"))
(if (not (= result 0))
(
(set errtxt ("\nCan't UnZip file: \"fobdir4.zip\"\n\nUnZip return code: %ld " result))
(abort errtxt)
)
)
(complete 75)
;--------Disk 7-------------------------------------------------------------
(askdisk
(prompt "\n\n\nPlease insert the disk labeled \"Disk 7\".")
(help @askdisk-help);
(dest "FOB_DISK_7")
(assigns)
)
(working "Unpacking files from disk 7.\n\nData files..")
(set result (run "t:unzip -o -qq FOB_DISK_7:fobdir5.zip -d fob_dest:"))
(if (not (= result 0))
(
(set errtxt ("\nCan't UnZip file: \"fobdir5.zip\"\n\nUnZip return code: %ld " result))
(abort errtxt)
)
)
(complete 87)
;--------Disk 8-------------------------------------------------------------
(askdisk
(prompt "\n\n\nPlease insert the disk labeled \"Disk 8\".")
(help @askdisk-help);
(dest "FOB_DISK_8")
(assigns)
)
(working "Unpacking files from disk 8.\n\nData files..")
(set result (run "t:unzip -o -qq FOB_DISK_8:fobdir6.zip -d fob_dest:"))
(if (not (= result 0))
(
(set errtxt ("\nCan't UnZip file: \"fobdir6.zip\"\n\nUnZip return code: %ld " result))
(abort errtxt)
)
)
(complete 100)
;--------Cleanup------------------------------------------------------------
(run "c:assign fob_dest:")
(delete t:unzip)